Closed Bug 560567 Opened 15 years ago Closed 15 years ago

XPCWrapper doesn't explain to the compiler that it's aware of how JS_SetReservedSlot works

Categories

(Core :: XPConnect, defect)

defect
Not set
minor

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity)

Attachments

(1 file, 1 obsolete file)

114 IteratorNext(JSContext *cx, uintN argc, jsval *vp) this should be void (see FinishCreatingIterator): 153 JS_SetReservedSlot(cx, obj, 1, INT_TO_JSVAL(idx)); 282 FinishCreatingIterator(JSContext *cx, JSObject *iterObj, JSBool keysonly) 295 if (!JS_SetReservedSlot(cx, iterObj, 0, PRIVATE_TO_JSVAL(ida)) || 296 !JS_SetReservedSlot(cx, iterObj, 1, JSVAL_ZERO) || 297 !JS_SetReservedSlot(cx, iterObj, 2, BOOLEAN_TO_JSVAL(keysonly))) { 298 return nsnull; this should be optimizable by checking for slot 2, and then unconditionally performing (void) sets for 0 and 1 380 CreateSimpleIterator(JSContext *cx, JSObject *scope, JSBool keysonly, 391 if (!JS_SetReservedSlot(cx, iterObj, 0, PRIVATE_TO_JSVAL(nsnull)) || 392 !JS_SetReservedSlot(cx, iterObj, 1, JSVAL_ZERO) || 393 !JS_SetReservedSlot(cx, iterObj, 2, JSVAL_TRUE)) { ibid. 502 NewResolve(JSContext *cx, JSObject *wrapperObj, JSBool wantDetails, 523 if (!::JS_GetReservedSlot(cx, wrapperObj, sFlagsSlot, &oldFlags) || 524 !::JS_SetReservedSlot(cx, wrapperObj, sFlagsSlot, this can be safely (void): 533 JS_SetReservedSlot(cx, wrapperObj, sFlagsSlot, oldFlags); 543 ResolveNativeProperty(JSContext *cx, JSObject *wrapperObj, 559 if (!::JS_GetReservedSlot(cx, wrapperObj, sFlagsSlot, &oldFlags) || 560 !::JS_SetReservedSlot(cx, wrapperObj, sFlagsSlot, this should be (void): 583 if (!::JS_SetReservedSlot(cx, wrapperObj, sFlagsSlot, oldFlags)) { 584 return JS_FALSE; 543 ResolveNativeProperty(JSContext *cx, JSObject *wrapperObj, 720 if (!isNativeWrapper && 721 (!::JS_GetReservedSlot(cx, wrapperObj, sFlagsSlot, &oldFlags) || 722 !::JS_SetReservedSlot(cx, wrapperObj, sFlagsSlot, 725 return JS_FALSE; 734 if (!isNativeWrapper && this should be (void): 735 !::JS_SetReservedSlot(cx, wrapperObj, sFlagsSlot, oldFlags)) {
Attached patch proposal (obsolete) — Splinter Review
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #440262 - Flags: review?(mrbkap)
Attached patch proposalSplinter Review
this is a minor update to proposal
Attachment #440262 - Attachment is obsolete: true
Attachment #482555 - Flags: review?(mrbkap)
Attachment #440262 - Flags: review?(mrbkap)
Attachment #482555 - Flags: review?(mrbkap)
This code went away with compartments.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: